<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>test</title>
    <script src="https://unpkg.com/vue@3"></script>
</head>
<body>
    <div id="app">
        <!-- 可以直接写表达式,但必须结构为值,逻辑体不行 -->
        <p>{{count+1}}</p>
        <p>{{false?'a':'b'}}</p>
        <p>{{user.name+"asjd"}}</p>
        <p>{{msg.split("/")[1]}}</p>
        <!-- 获取json的数据可以直接.属性获取 -->
        <p>{{user.name+user.id}}</p>

    </div>

</body>

<script>

    const {createApp} = Vue;
    createApp(
        {
            data:function(){
                return{
                    count:10,
                    msg:"/search/1",
                    user:{
                        name:"wwh",
                        id:123
                    }
                }
            }
        }
    ).mount("#app")
</script>

</html>